|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sponsorpay.sdk.android.DeviceInfo
public class DeviceInfo
Extracts device information from the host device in which the SDK runs.
Field Summary | |
---|---|
private static java.lang.String |
ANDROID_OS_PREFIX
Prefix appended to the OS version to identify the Android platform. |
protected Context |
mContext
Android application context, used to retrieve the rest of the properties. |
private java.lang.String |
mLanguageSetting
Language settings (the default locale). |
private java.lang.String |
mOsVersion
The running Android OS version (e.g. |
private java.lang.String |
mPhoneVersion
The device version (e.g. |
private java.lang.String |
mUDID
The unique device ID. |
Constructor Summary | |
---|---|
DeviceInfo(Context context)
The constructor immediately retrieves all the device information. |
Method Summary | |
---|---|
java.lang.String |
getLanguageSetting()
Get the default locale set by the user |
protected long |
getLongFromAppMetadata(java.lang.String key)
Extracts a long value from the meta-data configured in the application manifest XML file |
java.lang.String |
getOsVersion()
Get the running OS version |
java.lang.String |
getPhoneVersion()
Get the current phone model |
protected java.lang.String |
getStringFromAppMetadata(java.lang.String key)
Extracts a String value from the meta-data configured in the application manifest XML file |
java.lang.String |
getUDID()
Get the unique device ID |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String ANDROID_OS_PREFIX
private java.lang.String mUDID
private java.lang.String mOsVersion
private java.lang.String mPhoneVersion
private java.lang.String mLanguageSetting
protected Context mContext
Constructor Detail |
---|
public DeviceInfo(Context context)
context
- Android application contextMethod Detail |
---|
public java.lang.String getUDID()
public java.lang.String getOsVersion()
public java.lang.String getPhoneVersion()
public java.lang.String getLanguageSetting()
protected java.lang.String getStringFromAppMetadata(java.lang.String key)
key
- key to identify the piece of meta-data to return
protected long getLongFromAppMetadata(java.lang.String key)
key
- key to identify the piece of meta-data to return
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |